;Assembler header file for JPEG
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:11:42 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

        [       :LNOT: :DEF: JPEG_Hdr
        GBLS    JPEG_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

;Symbols for constants
JPEG_InfoMonochrome             *       &1
JPEG_InfoNoTrfm                 *       &2
JPEG_InfoDPIUnknown             *       &4
JPEG_ScaleDithered              *       &1
JPEG_ScaleErrorDiffused         *       &2
JPEG_ScaleGivenColourMapping    *       &4
JPEG_ScaleTranslucency          *       &FF0
JPEG_ScaleTranslucencyShift     *       4
JPEG_DestinationCoords          *       &1
JPEG_TransformDithered          *       &2
JPEG_TransformErrorDiffused     *       &4
JPEG_TransformGivenColourMapping *       &8
JPEG_TransformTranslucency      *       &1FE0
JPEG_TransformTranslucencyShift *       5
JPEG_FileType                   *       &C85
JPEG_PrintPlotting              *       &1
JPEG_PrintUsingTransTab         *       &2

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
JPEG_InfoFlags                  *       @

                                ^       0
                                #       Bits
JPEG_ScaleFlags                 *       @

                                ^       0
                                #       Bits
JPEG_TransformFlags             *       @

                                ^       0
JPEG_Image_i                    #       Byte
JPEG_Image                      *       @

                                ^       0
                                #       Bits
JPEG_PrintFlags                 *       @


;Symbols for SWI's and SWI reason codes
XJPEG_Info                      *       &69980
JPEG_Info                       *       &49980

JPEGInfo_Dimensions             *       &1
   ;Entry
   ;  R0 = &1
   ;  R1 -> image (JPEG_Image)
   ;  R2 = size (Int)
   ;Exit
   ;  R0 = info_flags (JPEG_InfoFlags)
   ;  R2 = width (Int)
   ;  R3 = height (Int)
   ;  R4 = xdpi (Int)
   ;  R5 = ydpi (Int)
   ;  R6 = workspace_size (Int)

XJPEG_FileInfo                  *       &69981
JPEG_FileInfo                   *       &49981

JPEGFileInfo_Dimensions         *       &1
   ;Entry
   ;  R0 = &1
   ;  R1 -> file_name (String)
   ;Exit
   ;  R0 = info_flags (JPEG_InfoFlags)
   ;  R2 = width (Int)
   ;  R3 = height (Int)
   ;  R4 = xdpi (Int)
   ;  R5 = ydpi (Int)
   ;  R6 = workspace_size (Int)

XJPEG_PlotScaled                *       &69982
JPEG_PlotScaled                 *       &49982
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = size (Int)
   ;  R5 = flags (JPEG_ScaleFlags)

XJPEG_PlotScaledMapped          *       &69982
JPEG_PlotScaledMapped           *       &49982
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = size (Int)
   ;  R5 = &4 :OR: flags (JPEG_ScaleFlags)
   ;  R6 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PlotFileScaled            *       &69983
JPEG_PlotFileScaled             *       &49983
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = flags (JPEG_ScaleFlags)

XJPEG_PlotFileScaledMapped      *       &69983
JPEG_PlotFileScaledMapped       *       &49983
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = x (Int)
   ;  R2 = y (Int)
   ;  R3 -> factors (OS_Factors)
   ;  R4 = &4 :OR: flags (JPEG_ScaleFlags)
   ;  R5 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PlotTransformed           *       &69984
JPEG_PlotTransformed            *       &49984
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 = size (Int)

XJPEG_PlotTransformedMapped     *       &69984
JPEG_PlotTransformedMapped      *       &49984
   ;Entry
   ;  R0 -> image (JPEG_Image)
   ;  R1 = &8 :OR: flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 = size (Int)
   ;  R4 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PlotFileTransformed       *       &69985
JPEG_PlotFileTransformed        *       &49985
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)

XJPEG_PlotFileTransformedMapped *       &69985
JPEG_PlotFileTransformedMapped  *       &49985
   ;Entry
   ;  R0 -> file_name (String)
   ;  R1 = &8 :OR: flags (JPEG_TransformFlags)
   ;  R2 -> trfm_or_rect (OS_Trfm)
   ;  R3 -> mapping (OSSpriteOp_ColourMapping)

XJPEG_PDriverIntercept          *       &69986
JPEG_PDriverIntercept           *       &49986
   ;Entry
   ;  R0 = flags (JPEG_PrintFlags)
   ;Exit
   ;  R0 = flags_out (JPEG_PrintFlags)

        ]
        END
